/**
 * Created by seeker910 on 2014/8/26.
 * @description 组件名称命名约定：继承container组件，名称以ViewPart结尾;继承control组件，名称以Part结尾
 * 联系我们组件
 */
Rsd.define('Rsd.hermit.sections.ContactFormPart', {
    extend: 'Rsd.hermit.sections.FormPart',
    requires: [
        'Rsd.form.Text',
        'Rsd.form.Label',
        'Rsd.form.Button', 
        'Rsd.form.TextArea',
        'Rsd.control.Svg'
    ],
    xtype: 'contact-form',
     /**
     * @description 标识该组件是否允许编辑
     */
    domEditable:false,
     /**
     * @description true:表示只允许在模板中修改
     */
    editInMaster:false,
    header:{
        position:'top',
        content:'Contact Us',
        height:100,
        style:{
            textAlign:'left',
            fontSize:'200%',
            fontWeight:'bold'
        },
    },  
    layout:'vbox', 
    dataSource:[
        {
            xtype:'text', 
            label:{position:'top',content:'Name',align:'left',height:30,style:{fontWeight:'bold'}},
            margin:'0 0 0 0',
            height:80,
            width:'90%',
        },
        {
            xtype:'text',
            label:{position:'top',content:'Email',align:'left',height:30,style:{fontWeight:'bold'}},
            margin:'0 0 0 0',
            height:80,
            width:'90%',
        },
        {
            xtype:'text',
            label:{position:'top',content:'Subject',align:'left',height:30,style:{fontWeight:'bold'}},
            margin:'0 0 0 0',
            height:80,
            width:'90%',
        },
        {
            xtype:'textarea',
            label:{position:'top',content:'Message',align:'left',height:30,style:{fontWeight:'bold'}},
            margin:'0 0 0 0',
            width:'90%',
            height:200
        },
        {
            xtype:'button',
            text:'SEND MESSAGE',
            margin:'50 0 0 0',
            height:40, 
            width:160,
            handler:'btn_send_message'
        }

    ],
    /*
     * */
    constructor: function ContactFormPart(config) {
        config = config || {};
        this.apply(config);
    },
    /**
     * 
     * @param {*} s 
     * @param {*} e 
     */
    btn_send_message:function btn_send_message(s,e)
    {
        Rsd.popup('sned message');
        return false;
    }
     
});